import store from "../../utils/store";
const app = getApp()
Page({
    data: {
        order: {},  // 订单数据
        status: {}  // 状态数据
    },
    onLoad: async function (options) {
        const factoryId = store.getItem("factoryId")
        const laneId = options.laneId
        const detail = await app.clientGet(`${app.ClientApi.getLaneDetail}/factoryId/${factoryId}/laneId/${laneId}`)
        this.setData({
            order: {
                ...detail.data_detect.result,
                ...detail.data_order,
                laneName: detail.data_status.result.laneName,
                type: detail.data_detect.result.type
            },
            status: {
                code: detail.data_status.code,
                message: detail.data_status.message,
                count: detail.data_status.result.amount,
                laneName:detail.data_status.result.laneName,
                unit: detail.data_status.result.unit
            }
        })
    }
});